-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes "InvalidOperationException" errors by performing async operations in SemaphoreSlim #796
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…erations in semaphore queue.
cheenamalhotra
changed the title
Fixes "InvalidOperationException" errors by performing async write operations in Semaphore Concurrent Queue
Fixes "InvalidOperationException" errors by performing async operations in Semaphore Concurrent Queue
Nov 13, 2020
cheenamalhotra
commented
Nov 13, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.cs
Show resolved
Hide resolved
cheenamalhotra
commented
Nov 13, 2020
...Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParserStateObjectManaged.cs
Show resolved
Hide resolved
This was
linked to
issues
Nov 13, 2020
martyt
reviewed
Nov 13, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNISslStream.cs
Outdated
Show resolved
Hide resolved
cheenamalhotra
force-pushed
the
fix459
branch
from
November 15, 2020 01:49
6f3a4e9
to
a6e8db2
Compare
cheenamalhotra
force-pushed
the
fix459
branch
from
November 15, 2020 17:54
a6e8db2
to
7cc72ed
Compare
cheenamalhotra
added
the
📈 Performance
Issues that are targeted to performance improvements.
label
Nov 17, 2020
roji
reviewed
Nov 17, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNISslStream.cs
Outdated
Show resolved
Hide resolved
cheenamalhotra
force-pushed
the
fix459
branch
from
November 17, 2020 09:42
9004a29
to
de07449
Compare
cheenamalhotra
changed the title
WIP: Fixes "InvalidOperationException" errors by performing async operations in Semaphore Concurrent Queue
Fixes "InvalidOperationException" errors by performing async operations in Semaphore Concurrent Queue
Nov 18, 2020
roji
reviewed
Nov 18, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIStreams.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIStreams.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs
Outdated
Show resolved
Hide resolved
cheenamalhotra
changed the title
Fixes "InvalidOperationException" errors by performing async operations in Semaphore Concurrent Queue
Fixes "InvalidOperationException" errors by performing async operations in SemaphoreSlim
Nov 18, 2020
Wraith2
reviewed
Nov 18, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNINpHandle.cs
Outdated
Show resolved
Hide resolved
Wraith2
reviewed
Nov 18, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.cs
Show resolved
Hide resolved
karinazhou
reviewed
Nov 18, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs
Show resolved
Hide resolved
cheenamalhotra
force-pushed
the
fix459
branch
2 times, most recently
from
November 18, 2020 23:59
df81c95
to
2d69793
Compare
cheenamalhotra
force-pushed
the
fix459
branch
from
November 19, 2020 00:00
2d69793
to
10421a9
Compare
DavoudEshtehari
approved these changes
Nov 19, 2020
This was referenced Mar 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #459 #54 #786 #792
Rework over PR #579 with helpful ideas from @roji and @DavoudEshtehari
This PR fixes the issue where below exception would occur randomly due to SslStream.WriteAsync collisions.
The design change introduces use of
SemaphoreSlim
withSNISslStream
andSNINetworkStream
overrides to ensure only 1 task is allowed to read/write to stream asynchronously at a time.Not fixed in this issue